package io.linfeng.modules.app.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;


@Data
@ApiModel(value = "发起投票帖请求体")
public class AddVoteForm implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 圈子id
     */
    @NotNull(message = "未选择圈子")
    @ApiModelProperty(value = "圈子id")
    private Integer topicId;

    /**
     * 地址名称
     */
    @ApiModelProperty(value = "地址名称")
    private String address;

    /**
     * 内容
     */
    @Length(max = 400, message = "内容不能超过400个字符")
    @NotBlank(message = "内容不能为空")
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 标题
     */
    @Length(max = 20, message = "标题不能超过20个字符")
    @NotBlank(message = "标题不能为空")
    @ApiModelProperty(value = "标题")
    private String voteTitle;

    /**
     * 1单选2多选
     */
    @NotNull(message = "请选择单选或多选")
    @ApiModelProperty(value = "1单选2多选")
    private Integer voteType;

    /**
     * 到期时间
     * 1:一天    2:7天   3:30天    4:90天
     */
    @ApiModelProperty(value = "到期时间 1:一天 2:7天 3:30天 4:90天")
    private Integer expireTime;


    @ApiModelProperty(value = "投票选项")
    private List<VoteOptionForm> voteOptions;


}
